import request from '@/router/axios';

const BASEURL = "/system/log"
export const exports = () => {
    return process.env.VUE_APP_BASE_URL + BASEURL + "/export"
}

export const userLog = (current, size) => {
    return request({
        url: BASEURL + '/userLog',
        method: 'get',
        params: {
            current,
            size
        }
    })
}

export const list = () => {
    return request({
        url: BASEURL,
        method: 'get'
    })
}
export const pageList = (current, size, params) => {
    return request({
        url: BASEURL + '/page',
        method: 'get',
        params: {
            ...params,
            current,
            size
        }
    })
}

// 删除
export function del(ids) {
    return request({
        url: BASEURL + '/delete',
        method: 'delete',
        params: {
            ids
        }
    })
}

// 修改
export function update(data) {
    return request({
        url: BASEURL + '/update',
        method: 'put',
        data: data
    })
}

// 新增
export function save(data) {
    return request({
        url: BASEURL + '/save',
        method: 'post',
        data: data
    })
}

// 查询详细
export function query(id) {
    return request({
        url: BASEURL + '/query',
        method: 'get',
        params: {
            id
        }
    })
}

